package org.example.chapter9.service.impl;

import org.example.chapter7.dao.UserDao;
import org.example.chapter7.pojo.User;
import org.example.chapter9.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author CoderXshuai
 * @date 2020/8/9/0009 17:46
 */
@Service
public class UserServiceImpl implements UserService {
    //注入MongoDBTemplate对象
    @Autowired
    private UserDao userDao;

    @Override
    public User getUser(Long id) {
        return userDao.getUser(id);
    }
}
